package com.cenwangkeji.zhihuimuye.ui.activity;

import android.os.Bundle;

import com.cenwangkeji.zhihuimuye.R;
import com.cenwangkeji.zhihuimuye.utils.DynamicLineChartManager;
import com.github.mikephil.charting.charts.LineChart;
import com.lws.basic.base.BaseActivity;

import java.util.ArrayList;
import java.util.List;

import butterknife.BindView;
import butterknife.ButterKnife;

public class CowDetailActivity extends BaseActivity {


    @BindView(R.id.lineChart1)
    LineChart mLineChart1;
    private DynamicLineChartManager mTemperatureManager;

    @Override
    public int setLayoutId() {
        return R.layout.activity_cow_detail;
    }



    @Override
    public void initData() {
        super.initData();
        ButterKnife.bind(this);
        initTemperature();
    }

    private void initTemperature() {
        List<String> names = new ArrayList<>(); //折线名字集合
        List<Integer> colour = new ArrayList<>();//折线颜色集合
        names.add("步数");
        colour.add(getResources().getColor(R.color.red_f51515));
        mTemperatureManager = new DynamicLineChartManager(mLineChart1, names, colour);
        mTemperatureManager.setYAxis(10000, 0, 7);
        mTemperatureManager.setDescription("7天步数");
        mTemperatureManager.addEntry(7000);
        mTemperatureManager.addEntry(8000);
        mTemperatureManager.addEntry(7000);
        mTemperatureManager.addEntry(6666);
        mTemperatureManager.addEntry(9000);
        mTemperatureManager.addEntry(6666);
        mTemperatureManager.addEntry(9000);

    }
}
